import request, { requestOld } from '@/utils/request'
import { batchTask } from './work'

// 查询违规记录列表
export function listHtwg(query) {
  return request({
    url: '/data/htwg/list',
    method: 'get',
    params: query
  })
}

// 违规召测
export function callHtwg(query) {
  return batchTask({
    newUrl: '/data/htwg/call',
    oldUrl: '/ChaobiaoModule/Tdata_ht_wg/GetCheckData',
    meterNos: query.meterNos,
    rooms: query.rooms,
    updateUrl: '/old/refresh/htWg',
    onItemOver: query.onItemOver
  })
}

// 清除违规
export function clearHtwg(query) {
  return batchTask({
    newUrl: '/data/htwg/clear',
    oldUrl: '/ChaobiaoModule/Tdata_ht_wg/Clear',
    meterNos: query.meterNos,
    rooms: query.rooms,
    updateUrl: '/old/refresh/htWg',
    onItemOver: query.onItemOver
  })
}